import 'package:flutter/material.dart';

class MapQueryPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _MapState();
}

class _MapState extends State<MapQueryPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color(0xfff2f2f2),
      appBar: AppBar(title: Text('地图查询')),
     /* body: Container(
        child: Column(
          children: [
            _buildSearch(),
            Expanded(
              child: Container(
                margin: EdgeInsets.all(15),
                child: GridView.builder(
                  gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                    crossAxisCount: 2,
                    mainAxisSpacing: 15,
                    crossAxisSpacing: 15,
                    childAspectRatio: 4 / 1,
                  ),
                  itemBuilder: (context, index) => _buildListViewItem(),
                  itemCount: 33,
                ),
              ),
            ),
          ],
        ),
      ),*/
    );
  }

  Widget _buildSearch() {
    return Container(
      alignment: Alignment.center,
      margin: EdgeInsets.only(left: 200, right: 200, top: 10),
      height: 40,
      child: Row(
        children: [
          Expanded(
            child: TextField(
              style: TextStyle(fontSize: 12),
              decoration: InputDecoration(
                contentPadding: EdgeInsets.all(10),
                hintText: '请输入...',
                hintStyle: TextStyle(fontSize: 12),
                border: OutlineInputBorder(),
              ),
            ),
          ),
          SizedBox(width: 15),
          // _searchBtn(),
        ],
      ),
    );
  }

  //搜索按钮
 /* Widget _searchBtn() {
    return Container(
      color: Color(u_2787de),
      width: 60,
      height: 30,
      child: OutlineButton(
        padding: EdgeInsets.all(0),
        child: Text(
          '搜索',
          style: TextStyle(
              color: Colors.white, fontSize: isLargeScreen ? 12.0 : 10.0),
        ),
        onPressed: () {},
      ),
    );
  }*/

 /* Widget _buildListViewItem() {
    return Container(
//      margin: EdgeInsets.all(15),
//    margin: EdgeInsets.only(left: 15,top: 15,right: 15),
      padding: EdgeInsets.all(15),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Image.asset(
            'assets/images/2.0x/map_nav.png',
            width: width(136),
            height: height(136),
            fit: BoxFit.cover,
          ),
          SizedBox(width: width(20)),
          Expanded(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Expanded(
                    child: Text(
                  '湖北省中医院',
                  style: TextStyle(
                      fontSize: 12,
                      fontWeight: FontWeight.w400,
                      color: Colors.black),
                )),
                Expanded(
                    child: Text(
                  '三四医院',
                  style: TextStyle(fontSize: 10, color: Colors.grey),
                )),
                Expanded(
                    child: Text(
                  '0516-69851120',
                  style: TextStyle(fontSize: 10, color: Colors.grey),
                )),
                Expanded(
                    child: Text(
                  '湖北省武汉市珞瑜路N号',
                  style: TextStyle(fontSize: 10, color: Colors.grey),
                )),
              ],
            ),
          ),
          Align(
            child: _buildNavButton(),
            alignment: Alignment.bottomRight,
          ),
        ],
      ),
      decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.all(Radius.circular(4))),
    );
  }*/

 /* Widget _buildNavButton() {
    return Container(
      width: width(120),
      height: height(50),
      child: FlatButton(
        padding: EdgeInsets.all(0),
        onPressed: () {},
        child: Text(
          '立即导航',
          style: TextStyle(
            fontSize: 12,
            fontWeight: FontWeight.w400,
            color: Colors.lightBlue,
          ),
        ),
        color: Color(0xffA7CDF1),
      ),
    );
  }*/
}
